1. Technical Field
The present invention relates to a memory access controller suitable for use in generating a musical sound signal by a personal computer.
2. Background Art
In recent years, there has been known a system for composing a memory tone generator using a personal computer to thereby generate a musical sound signal based on musical performance information. In such a system, wave data stored in a hard disk are read into a buffer memory in units of partial data (data block, for example one cluster), and contents of this buffer memory are further transmitted to a waveform memory. An envelope is then given to the wave data in this waveform memory, and a sound effect process is performed thereto, whereby the musical sound signal is generated (Patent Documents 1 to 3). In the hard disk, however, due to a large time lag until the data are actually read after receiving a read instruction from a CPU, the CPU needs to output the read instruction in advance to the hard disk before a time when the partial data (data block) is actually required.
[Patent Document 1]
Japanese Patent Publication No. 2671747
[Patent Document 2]
Japanese Patent Publication No. 2768204
[Patent Document 3]
Japanese Patent Publication No. 2798077
For instance, Patent Document 2 discloses a technique providing a pair of memory regions of a “first half” and a “last half” in the waveform memory for every sound channel to continuously play back the wave data by alternately accessing the pair of the regions. In this technique, successive address spaces are given to the regions of the “first half” and the “last half”, and the regions of the “first half” and the “last half” are alternately read by a tone generator circuit. As a result, a read address is changed in the shape of a sawtooth wave. When a readout of the region of the “first half” is completed by the tone generator circuit, an interruption is generated to the CPU and, under the control of the CPU, new partial data are read from the hard disk to the region of the “first half”. In parallel with this, the region of the “last half” is read by the tone generator circuit, and the musical sound signal is then synthesized based on the partial data in the region of the “last half”.
Similarly, when the readout of the region of the “last half” is completed by the tone generator circuit, an interruption is generated to the CPU and, under the control of the CPU, new partial data are read from the hard disk to the region of the “last half”. In parallel with this, the region of the “first half” is read by the tone generator circuit, and the musical sound signal is then synthesized. In this way, a partial data transmission to one region and a playback of data using the other region are repeatedly performed. Here, a speed of reading respective regions is determined based on a pitch (f-number) of the corresponding sound channel. Accordingly, one kind of wave data can be applied now to various pitches.
A progress situation of read addresses of a plurality of channels will now be explained using FIG. 2(b). Since a speed of reading the waveform memory for each sound channel is determined based on a pitch (f-number) of the sound channel, periods of the sawtooth waves tracing the read addresses are different for each sound channel as shown in the chart. In any sound channels, interruptions occur for every half period of the sawtooth wave, namely at timings indicated by white round marks, and an update of a channel corresponding memory region of a “first half” or a “last half” is started. When the periods of the sawtooth waves are different for every channel like this, many interruptions of the sound channels may occur almost at the same time near a certain timing (time tp in an example of the chart).
Incidentally, when the interruptions intensively occur like this, partial data will come to be read from a hard disk almost continuously. In order to write the wave data read from the hard disk in a buffer memory, however, it is necessary to transmit in advance the wave data previously stored in the buffer memory, to the waveform memory. As a result, even when the hard disk itself is in a readable state, there is a need to suspend the data read from the hard disk depending on a state of the buffer memory, whereby there has been a problem that the supply of the partial data does not meet the requirement.
When the periods of the sawtooth waves are different for every channel as shown in FIG. 2(b), many interruptions of the sound channels may occur almost at the same time near a certain timing (time tp in an example of the chart). If the interruptions intensively occur like this, the timing for reading the partial data from the hard disk gets delayed, whereby there has been a problem that the supply of the partial data does not meet the requirement especially to a channel with a short period of the read address.